<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> 
<head>
<%@ include file="../../include/easyui.jsp" %>
<%@ include file="../../include/pGrid.jsp" %>
<title>项目管理</title>
<script>
	$(function(){
		var gridParam = {
			url:"/console/com.fs.jzzn.pojo.NewProject/list",
			queryParams:{
				rightControl: true //启用数据权限控制
			},
			columns : [[ 
			     {field: 'pNo', title: '项目编号', width: 120} 
		    	,{field: 'pName', title: '项目名称', width: 300}
		    	,{field: 'orgNo', title: '机构编号', width: 120}
		    	,{field: 'orgNoName', title: '机构名称', width: 120}
		    	//,{field: 'department', title: '项目部', width: 200}
		    	,{field: 'region', title: '所属大区', width: 120}
		    	,{field: 'createTime', title: '创建时间', width: 150}
		    	,{field: 'createrName', title: '创建人', width: 120}
			]],
			onLoadSuccess: function(){
				p.tooltip('pName');
			}
		};
		p.dataGrid = $(p.dataGrid).datagrid( $.extend({}, p.dataGridParam,gridParam));
		/*事件响应*/
		$("#toolbar .easyui-linkbutton").on("click", function() {
			var motion_code = $(this).attr("motion_code");p.btnOneClick($(this));
			switch (motion_code) {
				case "01":
					p.gridAdd({ title : "项目管理信息新增", width : 650, height : 330 });
					break;
				case "02":
					p.gridModify({ title : "项目管理信息立项管理编辑", width: 650, height : 330 });
					break;
				case "03":
					p.gridDelete({ msg:"您确认删除当前选中项目管理记录？",url:"/console/com.fs.jzzn.pojo.NewProject/delete" });
					break;
				case "04":
					p.gridView({title : "项目管理信息查看", width : 650, height : 330 });
					break;
				case "05":
					p.gridQuery();
					break;
				case "07":
					p.down({filename:'项目管理'});
					break;
				default:
					break;
				}
		});
		$(window).resize(function () {
			$('body').layout('resize',{height:'100%'});
		});
	});
</script>
</head>
<body  class="easyui-layout">
	<!-- 但行高度33px，多行时 33乘以行数  -->
	<div data-options="region:'north',split:false,border:false">
		<div class="easyui-panel" data-options="fit:true,border:false">
			<!-- 查询条件表单，根据配置进行替换  -->
			<form id="queryForm"  >
				 <input type="hidden" name="className" value="com.fs.jzzn.pojo.NewProject" />
				<div class="fItem">
				  <input class="easyui-textbox" name="pNo" style="width:240px;" data-options="label:'项目编号:',required:false" />
				<input type="hidden" name="pNo_searchType" value="like" />
				 </div>
				 <div class="fItem">
				  	<input class="easyui-textbox" name="pName" style="width:240px;" data-options="label:'项目名称:',required:false" />
					<input type="hidden" name="pName_searchType" value="like" />
				 </div>
				<div class="fItem">
				 	<input type="hidden" name="orgNo_searchType" value="like" />
				 	<select class="easyui-combotreegrid" id="orgNo_tree" name="orgNo" style="width:240px;" data-options="label:'组织结构:',panelWidth:300,
			           	prompt:'请选择组织机构',
			           	idField: 'orgNo', 
						treeField: 'orgName',
						sortName:'orgOrder',
						icons: [{
							iconCls:'icon-remove',
							handler: function(e){
								$(e.data.target).textbox('setValue', '');
							}
						}],
						iconAlign:'right',
						textField:'orgName',
						onSelect:function(row){
							$('#orgNo_tree').combogrid('setText', row.orgName);
						},
						sortOrder:'asc',
			            url:'/console/com.fs.base.pojo.Org/list', 
			            queryParams:{isTreeGrid:'true', treeId:'id', treePid:'parentId' },
			            columns:[[    
			                {field:'orgName',			width:250,	title:'组织名称' }
			            ]]"></select>
				 </div>
			 <div class="fItem">
			  	 <select class="easyui-combobox" name="region" style="width:240px;" data-options="label:'所属大区:'" 
					url="/console/combobox?valueField=dicName&textField=dicName&modleName=dictionary&pCode=C1&pCode_searchType=eq" >
			 	</select>
				<input type="hidden" name="region_searchType" value="like" />
			 </div>
			<div class="fItem">
		  		<input class="easyui-combobox" name="createrId" style="width:240px;" url="/console/combobox?valueField=id&textField=nickName&modleName=user" data-options="label:'创建人:',required:false" />
		  		<input type="hidden" name="createrId_searchType" value="eq" />
		 	</div>
		 	
		 	<div class="fItem">
			 	<input class="easyui-datebox" style="width:240px;" name="createTime" data-options="label:'开始日期:',required:false" />
			 	<input type="hidden" name="createTime_searchType" value="between" />
			 	<input type="hidden" name="createTime_format" value="date" />
			</div>
			<div class="fItem">
			 	<input class="easyui-datebox" style="width:240px;" name="createTime" data-options="label:'截至日期:',required:false" />
			</div>
			</form>
		</div>
	</div>  

	<!-- 工具栏按钮 -->
	<div id="toolbar" class="easyui-panel" style="padding:3px;"></div>
	
	<!-- 表格 -->
	<div region="center" border="false">
		<table id="dataGrid"></table>
	</div>
</body>
</html>